//
//  RInput.m
//  Riji
//
//  Created by liujianlong on 2022/8/17.
//

#import "RInput.h"

@implementation RInput
- (instancetype)initWithCoder:(NSCoder *)coder
{
    self = [super initWithCoder:coder];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        [self loadView];
    }
    return self;
}
- (void)setPlaceholder:(NSString *)placeholder
{
    _placeholder = placeholder;
    self.input.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName:[UIColor colorWithHexString:@"#999999"]}];
}
- (IBAction)actionforsafe:(UIButton *)sender {
    sender.selected = !sender.selected;
    [self.input setSecureTextEntry:sender.selected];
}
@end
